package com.zhku.shoppingspringboot.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 * 
 * </p>
 *
 * @author jieeee
 * @since 2024-12-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
@ApiModel(value="User对象", description="")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "账号")
    @Length(max =32,message = "账号长度不能大于{max}个字符")
    private String account;

    @Length(max =32,message = "账号长度不能大于{max}个字符")
    @ApiModelProperty(value = "密码")
    private String password;

    @Length(max =11,message = "电话号码长度不能大于{max}个字符")
    @ApiModelProperty(value = "电话号码")
    private String mobile;

    @ApiModelProperty(value = "个人头像")
    private String avatar;

    @ApiModelProperty(value = "昵称")
    private String nickname;

    @ApiModelProperty(value = "性别")
    private String gender;

    @ApiModelProperty(value = "生日")
    private String birthday;

    @ApiModelProperty(value = "城市邮编码")
    private String cityCode;

    @ApiModelProperty(value = "职业编号")
    private String provinceCode;

    @ApiModelProperty(value = "职业")
    private String profession;
    @ApiModelProperty(value = "身份（0用户,1商家，2管理员）")
    private Integer userType;

}
